import {httprequests} from '@/miniprogram/utils/httpReq.js'

export const addressinsert = (data) =>{
    return httprequests('ums-member-address/addMemberAddress',"POST",data)
}

export const addressQuery = (data) =>{
    return httprequests('ums-member-address/getAddress?memberId=',"GET",{memberId:data})
}

export const deleteAddress = (data) =>{
    return httprequests('ums-member-address/deleteMmeberAddress','POST',data)
}

export const changeDefaultaddr = (data) =>{
    return httprequests('ums-member-address/addrDefaultchange','POST',data)
}
export const editMemberAddress = (data) =>{
    return httprequests('ums-member-address/editMemberAddress','POST',data)
}



//根据地址id获取地址
export const getAddressByaddressId = (data) =>{
    return httprequests('ums-member-address/getAddressByaddressId?Id=',"GET",{id:data})
}


//获取默认地址
export const getdefaultAddress = (data) =>{
    return httprequests('/ums-member-address/getdefaultAddress','GET',{
        defaultStatus:data.defaultStatus
    })
}
